Add support for the UUID type - #23
Merged
Merged
Conversation
mmalfertheiner
approved these changes
Jul 9, 2025
ThoSap
commented
Jul 9, 2025
Comment on lines
-94
to
+95
| property.format("int64"); | ||
| property.format(""); |
Member
Author
There was a problem hiding this comment.
A BigDecimal can be bigger than int64, therefore I removed the format here.
https://swagger.io/docs/specification/v3_0/data-models/data-types/#numbers
Comment on lines
+152
to
+153
| property.type("string"); | ||
| property.format("uuid"); |
Member
Author
There was a problem hiding this comment.
The OpenAPI specification has a built-in format for UUID, see https://swagger.io/docs/specification/v3_0/data-models/data-types/#strings
There was a problem hiding this comment.
Pull Request Overview
Adds end-to-end support for UUID types—both raw and wrapped—in persistence, JSON binding, MVC endpoints, and OpenAPI docs.
- Extended DB changelogs with
uuidanduuid_as_stringcolumns. - Introduced
WrappedUUIDJavaTypeand associated wrapper types, JPA mappings, converters, and tests. - Updated MVC controllers, Jackson deserializer, property editor, and Swagger customizers to handle UUID.
Reviewed Changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/test/resources/db/changelog/2024-09-06-create-wrapper-type-testing-table.yml | Added uuid_value / uuid_value_as_string |
| src/test/resources/db/changelog/2024-09-06-create-custom-type-testing-table.yml | Added uuid / uuid_as_string columns |
| src/test/java/it/aboutbits/.../TupleTransformerTest.java | Updated tuple transformer tests for UUID |
| src/test/java/it/aboutbits/.../WrapUUIDRecord.java | New UUID record wrapper |
| src/test/java/it/aboutbits/.../WrapUUIDClass.java | New UUID class wrapper |
| src/test/java/it/aboutbits/.../WrapperTypesModelRepository.java | Added findBy methods for UUID wrappers |
| src/test/java/it/aboutbits/.../WrapperTypesModel.java | Added wrapped-UUID fields with Java/Jdbc types |
| src/test/java/it/aboutbits/.../WrapUUIDRecordJavaType.java | JavaType for WrapUUIDRecord |
| src/test/java/it/aboutbits/.../WrapUUIDClassJavaType.java | JavaType for WrapUUIDClass |
| src/test/java/it/aboutbits/.../WrapperTypesJpaTest.java | JPA tests for wrapped-UUID behavior |
| src/test/java/it/aboutbits/.../CustomTypeTestModelRepository.java | Added findByUuid methods |
| src/test/java/it/aboutbits/.../CustomTypeTestModel.java | Added raw UUID fields and converter |
| src/test/java/it/aboutbits/.../CustomTypeJpaTest.java | Tests for raw UUID persistence |
| src/test/java/it/aboutbits/.../CustomTypeTestController.java | MVC endpoints for UUID path/param/body |
| src/test/java/it/aboutbits/.../BodyWithUUID.java | New request body type for UUID |
| src/test/java/it/aboutbits/.../CustomTypeBindingsForControllerTest.java | Controller tests for UUID binding |
| src/main/java/it/aboutbits/.../CustomTypePropertyEditor.java | Added UUID parsing support |
| src/main/java/it/aboutbits/.../CustomTypePropertyCustomizer.java | Extended OpenAPI schema for UUID |
| src/main/java/it/aboutbits/.../CustomTypeModelConverter.java | Model conversion for UUID type |
| src/main/java/it/aboutbits/.../WrappedUUIDJavaType.java | Base Hibernate type for wrapped-UUID |
| src/main/java/it/aboutbits/.../UUIDConverter.java | JPA AttributeConverter for UUID ↔ String |
| src/main/java/it/aboutbits/.../CustomTypeDeserializer.java | Jackson deserializer for UUID |
Comments suppressed due to low confidence (1)
src/test/java/it/aboutbits/springboot/toolbox/persistence/transformer/TupleTransformerTest.java:194
- List does not have a
getFirst()method; useresult.dataRecords.get(0)or switch to a Deque if you needgetFirst()behavior.
var firstRecord = result.dataRecords.getFirst();
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds support for using a
WrappedUUIDJavaTypeID, as well as for using it with Jackson and the OpenAPI document.